package com.ktjy.ch07.pojo;

public class User {


    private String username;

    public User() {
    }

    public User(String username) {
        this.username = username;
    }

    //类中的成员方法返回值是当前引用的对象
    public User eat() {
        System.out.println(username + "eat");
        return this;
    }

    public User play(String str) {
        System.out.println(username + "play" + str);
        return this;
    }


}
